import {createRouter,createWebHistory } from 'vue-router'
//导入组件



//定义路由关系
const routes = [
    {
        path: "/",
        redirect: "/Home",
    },
    {
        path:"/Home",
        name:"Home",
        component:() => import('../views/HomePage.vue')
    },
    {
        path:"/Login",
        name:"login",
        component:() => import('../views/LoginPage.vue')
    }

]

//创建路由器
const router = createRouter({
    history:createWebHistory(),
    routes:routes
})

//导出路由
export default router;